package com.recharge.service;

import com.recharge.common.result.ResultDO;
import com.recharge.core.entity.RouteFilterEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import com.recharge.domain.query.RouteFilterQueryDO;
import com.recharge.domain.vo.RouteFilterDO;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Reagan
 * @since 2020-09-21
 */
public interface RouteFilterService extends IService<RouteFilterEntity> {

    /**
     * 添加路由过滤
     * @param domain
     * @return ResultDO
     */
    public ResultDO add(RouteFilterDO domain);

    /**
     * 返回路由过滤
     * @param id
     * @return ResultDO
     */
    public ResultDO get(String id);

    /**
     * 删除路由过滤
     * @param id
     * @return
     */
    public ResultDO remove(String id);

    /**
     * 查找路由过滤
     * @param query
     * @return ResultDO
     */
    public ResultDO find(RouteFilterQueryDO query);

    /**
     * 根据代理商ID和路由类型查询供应商ID列表
     * @param merchantId
     * @param routerType
     * @return
     */
    public ResultDO findRouterByMerchantId(String merchantId, Integer routerType);
    /**
     * 根据供应商ID和路由类型查询代理商ID列表
     * @param providerId
     * @param routerType
     * @return
     */
    public ResultDO findRouterByProviderId(String providerId, Integer routerType);


    public ResultDO getRouterByProviderAndMerchantId(String providerId, String merchantId, int type);
}
